package com.iweb.day04;

/**
 * @author WuYongheng
 * @date 2021/10/26
 * @description
 */
public class TestRectangle {
    public static void main(String[] args) {
        //创建对象
        Rectangle rectangle=new Rectangle();
        // 为对象的属性赋值
        rectangle.length = 10.5;
        rectangle.wide = 5.5;

        // 计算周长
        double result = rectangle.perimeter();
        System.out.println("长方形的周长为："+ result);

        // 计算面积

        rectangle.showArea();

    }
}
